﻿@model Capokun.Models.Song
@{
    ViewBag.Title = "Create a new Capoeira song";
    ViewBag.Description = "This page allows creating a new Capoeira song.";
    Layout = "~/Views/Shared/_Layout_en-US.cshtml";
}
<section id="content" class="body">
    <script>
        $(function () {
            $("#tabs").tabs({ selected: 2 });
        });
        $(document).ready(function () {
            $('a[href|="#tabs-1"]').click(function () {
                window.location = "@Url.Action("All")";
            });
            $('a[href|="#tabs-2"]').click(function () {
                window.location = "@Url.Action("Favorites")";
            });
            $('a[href|="#tabs-3"]').click(function () {
                window.location = "@Url.Action("Create")";
            });
        });

    </script>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">All</a></li>
            <li><a href="#tabs-2">Favorites</a></li>
            <li><a href="#tabs-3">Create a new song</a></li>
        </ul>
        <div id="tabs-1">
        </div>
        <div id="tabs-2">
        </div>
        <div id="tabs-3">
            <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
            @using (Html.BeginForm())
            {
                @Html.ValidationSummary(true)
                <fieldset>
                    <legend></legend>
                    <div class="editor-label">
                        Created by <span class="redStar">*</span>
                    </div>
                    <div class="editor-field">
                        <fb:login-button data-show-faces="false" autologoutlink='false' perms='email,user_birthday,status_update,publish_stream'
                            id="fbLogingButton"></fb:login-button>
                        <div id="fbTextWithLoginButton">
                            Creating a new song requires a connexion to a Facebook account</div>
                        <img id="loggedFbPicture" />
                        <div id="loggedFbName">
                        </div>
                        <br />
                        <br />
                        <br />
                        <input id="SubmittedBy" class="hiddenField" name="SubmittedBy" data-val-required="Creating a new song requires a connexion to a Facebook account"
                            data-val="true" />
                        <span class="field-validation-valid" data-valmsg-replace="true" data-valmsg-for="SubmittedBy">
                        </span>
                    </div>
                    @*
                    <div class="editor-label">
                        Title in portuguese <span class="redStar">*</span>
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.SongId)
                        @Html.ValidationMessageFor(model => model.SongId, "Le champ Titre est requis")
                    </div>
                    <div class="editor-label">
                        Title in English
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.SongId_en)
                    </div>*@
                    <div class="editor-labelTwoCols">
                        <div class="editor-label">
                            Title in Portuguese <span class="redStar">*</span>
                        </div>
                        <div class="editor-label">
                            Title in English
                        </div>
                    </div>
                    <div class="editor-fieldTwoCols">
                        <div class="editor-field">
                            @Html.EditorFor(model => model.SongId)
                            @Html.ValidationMessageFor(model => model.SongId, "The Title in Portuguese field is required")
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.SongId_fr)
                        </div>
                    </div>
                    <div class="editor-label">
                        Embedded link <i><a href="http://www.youtube.com/youtubeonyoursite?hl=en " target="_blank">
                            more information</a></i>
                    </div>
                    <div class="editor-field">
                        @Html.TextAreaFor(model => model.Link)
                        @Html.ValidationMessageFor(model => model.Link)
                    </div>
                    <div class="editor-labelTwoCols">
                        <div class="editor-label">
                            Content in portuguese<span class="redStar">*</span>
                        </div>
                        <div class="editor-label">
                            Content in english
                        </div>
                    </div>
                    <div class="editor-fieldTwoCols">
                        <div class="editor-field">
                            <textarea id="Content" cols="50" rows="15" name="Content" data-val-required="The Content in portuguese field is required."
                                data-val="true" cols="20" class="valid"></textarea>
                            <span data-valmsg-replace="true" data-valmsg-for="Content" class="field-validation-valid">
                            </span>
                        </div>
                        <div class="editor-field">
                            <textarea id="Content_en" cols="50" rows="15" name="Content_en" data-val="false"
                                cols="20" class="valid"></textarea>
                        </div>
                    </div>
                    <br />
                    <p>
                        <input type="submit" value="Send" id="createButton" />
                    </p>
                </fieldset>
            }
        </div>
    </div>
</section>
<section id="contentMobile" class="body">
    Mobile device detected!
<br /> <a href="@Url.Content("~/App_EN.htm")" >let's go to the mobile song application
    here</a>
</section>
